package com.ikas.ai.server.module.job;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class TestJobHandler {

    @XxlJob(value = "testJob")
    public ReturnT<String> demoJobHandler() {
        //执行参数
        String params = XxlJobHelper.getJobParam();
        log.info("--------------->传入参数params:{}", params);
        ReturnT<String> success = ReturnT.SUCCESS;
        success.setMsg("---------------->执行任务成功,execute success----->");
        return success;
    }
}
